/*
 * @Author: ReinerLau lk850593913@gmail.com
 * @Date: 2022-09-14 10:17:54
 * @LastEditors: ReinerLau lk850593913@gmail.com
 * @LastEditTime: 2022-10-24 16:22:55
 * @FilePath: \robot\src\api\robot-archives.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request.js";

export function fetchList(params) {
  return request({
    url: "/robot-archives/v1/getRobotAndCompany",
    method: "get",
    params: params,
  });
}

export function findByRobotTypeAndCompany(type, company = "") {
  return request({
    url: `/robot-archives/v1/findByRobotTypeAndCompany/${type}`,
    method: "post",
    params: { companyName: company },
  });
}

export function getRobotType(params) {
  return request({
    url: "/robot-archives/v1/getRobotType",
    method: "get",
    params: params,
  });
}

/**
 * @description: 选择围界车
 * @param {*} id 机器人id
 * @return {*}
 */
export function getChoosePatroling(id) {
  return request({
    url: `/robot-cruise/patrolingCruise/chose/${id}`,
    method: "get",
  });
}
